package android_design_mode.chapter05_factory_method;

public class ConcreteFactory extends Factory {


    @Override
    public <T extends Product> T createProduct(Class<T> clz) {
        Product p = null;
        try {
            p = (Product) Class.forName(clz.getName()).newInstance();
        } catch (Exception e) {

        }
        return (T) p;
    }


}
